//
//  MOSecurity.h
//  AFBrowser
//
//  Created by alfie on 2020/9/9.
//

#import <Foundation/Foundation.h>

@interface MOSecurity : NSObject

/**
 @constant   kCCAlgorithmAES     高级加密标准，128位(默认)
 @constant   kCCAlgorithmDES     数据加密标准
 */
@property (nonatomic, assign) uint32_t algorithm;



/// 单例
+ (instancetype)sharedSecurity;

/// 加密字符串并返回base64编码字符串
- (NSString *)encryptString:(NSString *)string;

/// 解密字符串
- (NSString *)decryptString:(NSString *)string;



+ (NSString *)encryptAES256:(NSString *)plaintext error:(NSError **)error;
+ (NSString *)decryptAES256:(NSString *)ciphertext error:(NSError **)error;
@end


